package hausaufgabe;

public class Pavlov implements GefStrategie {

	private boolean firstRound = true;
	private boolean opponentsLast;
	private boolean myLast;
	
	public boolean getNextDecision() {
		if(firstRound)
		{
			firstRound = false;
			myLast = true;
			return true;
		}
		else if(myLast&&!opponentsLast||!myLast&&opponentsLast)
		{
			myLast = false;
			return false;
		}
		else
		{
			myLast = true;
			return true;
		}
	}

	public void setOpponentsLastDecision(boolean decision) {
		opponentsLast = decision;
	}

	public String getStrategyName() {
		return "Pavlov";
	}
}